<?php
namespace Album\Form;

use Zend\Form\Form;

class AlbumForm extends Form
{
	public function __construct($name = null)
	{
		parent::__construct('album');
	//	$this->setAttribute('method','post');
	//	$this->setAttribute('class', 'well');
		$this->setAttributes(array(
			'method' => 'post',
			'id' => 'infoAlbum',
		));
		$this->add(array(
			'name' => 'id',
			'attributes' => array(
				'type' => 'hidden',
			),
		));
		
		$this->add(array(
			'name' => 'title',
			'attributes' => array(
				'type' => 'text',
				'placeholder' => 'Album title...',
				'class' => 'form-control',

			),
			'options' => array(
				'label' => 'Title',
			),
		));
		
		$this->add(array(
			'name' => 'artist',
			'attributes' => array(
				'type' => 'text',
				'placeholder' => 'Artist name...',
				'class' => 'form-control',
				'required' => 'required',
			),
			'options' => array(
				'label' => 'Artist',
			),
		));
		
		$this->add(array(
			'name' => 'submit',
			'attributes' => array(
				'type' => 'submit',
				'value' => 'Go',
				'id' => 'submitbutton',
				'class' => 'btn btn-primary',
			),
		));
	}
}